namespace MvcMovieNew.Migrations
{
    using MvcMovieNew.Models;
    using System;
    using System.Data.Entity;
    using System.Data.Entity.Migrations;
    using System.Linq;

    internal sealed class Configuration : DbMigrationsConfiguration<MvcMovieNew.Models.MovieDbContext>
    {
        public Configuration()
        {
            AutomaticMigrationsEnabled = false;
        }

        protected override void Seed(MvcMovieNew.Models.MovieDbContext context)
        {
            //  This method will be called after migrating to the latest version.

            //  You can use the DbSet<T>.AddOrUpdate() helper extension method 
            //  to avoid creating duplicate seed data. E.g.
            //
            context.Movies.AddOrUpdate(

              new Movie { ID = 1, Title = "Shawshank redemption", ReleaseDate = new DateTime(2001, 12, 12), Genre="Thriller", price = 9.99M , Rating="R" },
              new Movie { ID = 2, Title = "Gladiator", ReleaseDate = new DateTime(2003, 01, 12), Genre = "Action", price = 9.99M, Rating = "PG" },
              new Movie { ID = 3, Title = "Matrix", ReleaseDate = new DateTime(2002, 11, 12), Genre = "Action", price = 9.99M, Rating = "PG" },
              new Movie { ID = 4, Title = "Up in the Air", ReleaseDate = new DateTime(2001, 07, 12), Genre = "Animation", price = 9.99M , Rating="R" }
            );
            //
        }
    }
}
